package com.ruoyi.activity.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.activity.mapper.TbLotteryActivityMapper;
import com.ruoyi.activity.domain.TbLotteryActivity;
import com.ruoyi.activity.service.ITbLotteryActivityService;

/**
 * 抽奖Service业务层处理
 *
 * @author ruoyi
 * @date 2025-07-29
 */
@Service
public class TbLotteryActivityServiceImpl implements ITbLotteryActivityService {
    @Autowired
    private TbLotteryActivityMapper tbLotteryActivityMapper;

    /**
     * 查询抽奖
     *
     * @param activityId 抽奖主键
     * @return 抽奖
     */
    @Override
    public TbLotteryActivity selectTbLotteryActivityByActivityId(Integer activityId) {
        return tbLotteryActivityMapper.selectTbLotteryActivityByActivityId(activityId);
    }

    /**
     * 查询抽奖列表
     *
     * @param tbLotteryActivity 抽奖
     * @return 抽奖
     */
    @Override
    public List<TbLotteryActivity> selectTbLotteryActivityList(TbLotteryActivity tbLotteryActivity) {
        return tbLotteryActivityMapper.selectTbLotteryActivityList(tbLotteryActivity);
    }

    /**
     * 新增抽奖
     *
     * @param tbLotteryActivity 抽奖
     * @return 结果
     */
    @Override
    public int insertTbLotteryActivity(TbLotteryActivity tbLotteryActivity) {
        return tbLotteryActivityMapper.insertTbLotteryActivity(tbLotteryActivity);
    }

    /**
     * 修改抽奖
     *
     * @param tbLotteryActivity 抽奖
     * @return 结果
     */
    @Override
    public int updateTbLotteryActivity(TbLotteryActivity tbLotteryActivity) {
        return tbLotteryActivityMapper.updateTbLotteryActivity(tbLotteryActivity);
    }

    /**
     * 批量删除抽奖
     *
     * @param activityIds 需要删除的抽奖主键
     * @return 结果
     */
    @Override
    public int deleteTbLotteryActivityByActivityIds(Integer[] activityIds) {
        return tbLotteryActivityMapper.deleteTbLotteryActivityByActivityIds(activityIds);
    }

    /**
     * 删除抽奖信息
     *
     * @param activityId 抽奖主键
     * @return 结果
     */
    @Override
    public int deleteTbLotteryActivityByActivityId(Integer activityId) {
        return tbLotteryActivityMapper.deleteTbLotteryActivityByActivityId(activityId);
    }
}
